<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>001</title>
    <link rel="stylesheet" href="../css/bootstrap.min.css">
    <link rel="stylesheet" href="../css/bootstrap.css">
    <script type="text/javascript" src="../js/jquery-3.2.1.min.js"></script>
    <script type="text/javascript" src="../js/vue-resource.min.js"></script>
    <script type="text/javascript" src="../js/bootstrap.min.js"></script>
    <script type="text/javascript" src="../js/vue.js"></script>

    <style>
        #elec_body {
            margin: 100px 200px;
        }


    </style>

</head>
<body>

    <div id="elec_body">

        <h1>电动车显示</h1>

        <hr>
        <div id="elecbicycle_div">
            <div  v-for="elecbicycle in elecbicycles">
                <label>
                    {{ elecbicycle.elecbicycleID }}
                </label>
                <label>
                    {{ elecbicycle.elecbicycleUseState }}
                </label>
                <br>
                <label>
                    {{ elecbicycle.elecbicycleSteward }}
                </label>
                <br>
                <img v-bind:src="elecbicycle.elecbicycleQRcodesrc"/>
            </div>
            <hr>
        </div>
    </div>

    <script>

        var elecbicycle_vue = new Vue({
            el:'#elecbicycle_div',
            data:{
                elecbicycles: [
                    { elecbicycleID: "d1", },
                    { elecbicycleUseState: "true",},
                    { elecbicycleSteward: "false"},
                    { elecbicycleQRcodesrc:"../qrcode/d1.png"}
                ],
            },
            methods: {
                request: function () {

                    var url = "http://localhost:8080/login/login";
                    console.log(this.user.id,this.user.password);

                    $.ajax({
                        url:url,
                        type:'POST',
                        contentType:'application/json; charset=utf-8',
                        data:JSON.stringify(this.user),
                        success:function (data) {
                            console.log(data);
                        }
                    });
                }
            },
        });

    </script>

</body>

</html>
